package com.sghj.SysPermission.entity.Vo;

import com.baomidou.mybatisplus.annotation.*;
import com.sghj.utils.Validate.password.Password;
import com.sghj.utils.Validate.phone.Phone;
import com.sghj.utils.Validate.username.UserName;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import javax.validation.constraints.DecimalMin;
import java.util.Date;

/**
 * @author xrx
 * @Date 2022/2/25
 * @apiNote
 */
@Data
public class userAddVo {

    @ApiModelProperty(value = "用户ID")
    @TableId(value = "SysUserId", type = IdType.AUTO)
    private Integer SysUserId;

    @ApiModelProperty(value = "用户名称")
    @TableField("SysUserName")
    @UserName
    private String SysUserName;

    @ApiModelProperty(value = "用户密码")
    @Password
    private String pwd;

    @ApiModelProperty(value = "关联Sys_institution")
    @TableField("institution_id")
    private Integer institutionId;

    @ApiModelProperty(value = "手机号")
    @TableField("phone")
    @Phone
    private String phone;

    @ApiModelProperty(value = "备注")
    @TableField("memo")
    private String memo;

    @ApiModelProperty(value = "用户类型")
    @TableField("UserType")
    @DecimalMin(value = "0",message = "输入必须为大于0的数字")
    private String UserType;

    @ApiModelProperty(value = "用户签章")
    @TableField("UserSign")
    private String UserSign;

    @ApiModelProperty(value = "是否删除")
    @TableField("is_delete")
    @TableLogic
    private String isDelete;

    @ApiModelProperty(value = "创建时间")
    @TableField(fill = FieldFill.INSERT)
    private Date createTime;

    @ApiModelProperty(value = "更新时间")
    @TableField(fill = FieldFill.INSERT_UPDATE)
    private Date updateTime;
    //角色组
    private int[] roleIds;
}
